//
//  MesInfoController.m
//  NoNameAmazing
//
//  Created by liuyang on 2017/9/28.
//  Copyright © 2017年 北京执行力科技有限公司. All rights reserved.
//

#import "MesInfoController.h"
#import "MesInfoModel.h"
@interface MesInfoController ()
@property (weak, nonatomic) IBOutlet UILabel *titleLab;
@property (weak, nonatomic) IBOutlet UILabel *timeLab;
@property (weak, nonatomic) IBOutlet UILabel *contentLab;
@property(nonatomic,strong)NSMutableDictionary * dict;
@end

@implementation MesInfoController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"消息";
    [self requestMesInfo];
}

-(void)requestMesInfo
{
    NSDictionary *params = @{@"userid":[us objectForKey:kUserid],
                             @"id":self.mid
                             };
    [NetWorkManager requestWithType:1 withUrlString:@"/message/getMessagedetail.do" withParaments:params withSuccessBlock:^(id object) {
       
        if ([object[@"status"]intValue]==1 ) {
            _dict = [[NSMutableDictionary alloc]initWithDictionary:object[@"appMessage"]];
            self.titleLab.text = _dict[@"subject"];
            self.timeLab.text = _dict[@"createTime"];
            self.contentLab.text = _dict[@"content"];
        }
        
    } withFailureBlock:^(NSError *error) {
        
        
    } progress:^(float progress) {
        
    }];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
